home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Information
/
THINK C Digest
/
1992
/
92-09
< prev
next >
Wrap
Text File
|
1995-12-31
|
98KB
|
3,076 lines
Path: ucivax!gateway
From: abboud@cedrus.cedrus.com ("Hisham A. Abboud")
Subject: free 256K SIMMs available
Message-ID: <9209011937.AA07840@cedrus.com>
Newsgroups: fa.think-c
Lines: 17
Date: 1 Sep 92 20:10:15 GMT
Dear netters,
I have a few 256K SIMMs available for the first to ask, free.
All you got to do is email me. I'll send you our postal
address, you send me back a self-addressed envelope stamped
with 75 cents, and the SIMMs will be yours. Also, let me know
whether you want 2 or 4 SIMMs.
Ciao,
Hisham.
Hisham A. Abboud, Cedrus Corp. [Internet: abboud@cedrus.com]
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (aaron barnett)
Subject: debugger
Message-ID: <01GOA1IWUISI8WW0NL@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 9
Date: 1 Sep 92 21:44:34 GMT
X-Envelope-to: think-c@ics.uci.edu
hello,
my program runs great when launched as an APPL or from think-c, but
does terrible things in the debugger. first it crashed at insertMenu.
so i used an MBAR resource. then it crashed at getnewcwindow. so i
called that earlier then i got passed those and crashed somewhere else.
where is probably irrelevant so i didnt check.
what could cause this?
frustrated in frostburg
Path: ucivax!gateway
From: gurgle@netcom.com (Pete Gontier)
Subject: ftp server no login
Message-ID: <9209020419.AA27347@netcom.netcom.com>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 5
Date: 2 Sep 92 04:20:35 GMT
Has the ftp server worked recently for anyone? I get an almost-immediate
connection, but then no login prompt.
--
Pete Gontier // EC Technology // gurgle@netcom.com
Path: ucivax!gateway
From: wwedel@uswest.com (Wally Wedel)
Subject: Re: ftp server no login
Message-ID: <9209021503.AA28134@westward.advtech.uswest.com>
Newsgroups: fa.think-c
Lines: 14
Date: 2 Sep 92 15:03:39 GMT
>Has the ftp server worked recently for anyone? I get an almost-immediate
>connection, but then no login prompt.
>
>--
> Pete Gontier // EC Technology // gurgle@netcom.com
I see the same thing from Colorado Super Net.
Wally Wedel
U S WEST Communications
4001 Discovery Drive, Suite 370
Boulder, CO 80303
Internet: wwedel@uswest.com AppleLink: D5100 Voice: 303-541-6052
Path: ucivax!gateway
From: CORMACK@psyvax.psy.utexas.edu
Subject: ftp server
Message-ID: <9209020924.aa22517@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 15
Date: 2 Sep 92 16:25:02 GMT
I was able to log on and ftp this morning from right here
in lil' ol' Texas. I originally responded to the original poster
to save bandwidth as I thought the problem might not be widespread.
-Larry
---------------------------------------------------------------
Lawrence K. Cormack | cormack@psyvax.psy.utexas.edu
Department of Psychology | w: (512) 471-3358
U.T. Austin | h: (512) 873-9464
Path: ucivax!gateway
From: nagel@cigna.uucp (Mark Nagel)
Subject: Re: ftp server no login
Message-ID: <9209021838.AA10404@Cigna.COM>
Newsgroups: fa.think-c
Lines: 19
Date: 2 Sep 92 18:48:36 GMT
References: <9209020419.AA27347@netcom.netcom.com>
In mail.think-c you write:
>Has the ftp server worked recently for anyone? I get an almost-immediate
>connection, but then no login prompt.
The problem is isolated to sites not providing rapid enough name
server responses, or something like that. Supposedly, the network
people at UCI are working on making the server less sensitive or
whatever is necessary to resolve this problem. I've been keeping
them aware that this is causing trouble for people on this list. If
all else fails, you can always use the mail server until the ftp
daemon is repaired.
Mark
--
Mark Nagel <nagel@cigna.com> | DISCLAIMER: Any resemblence of these
Network Administrator | opinions to those of CIGNA are purely
CIGNA/FIRST | coincidental.
(Don't start vast projects with half-vast ideas)
Path: ucivax!gateway
From: nagel@cigna.uucp ("Mark D. Nagel")
Subject: more on ftp problems
Message-ID: <3687.715466281@cigna.com>
Newsgroups: fa.think-c
Reply-To: nagel@cigna.uucp
Organization: CIGNA FIRST, Irvine, CA
Lines: 14
Date: 2 Sep 92 20:58:30 GMT
Phone: (714) 727-4242
I've been informed that the failures stem from a kernel bug in the
Dynix operating system running on ftp.ics.uci.edu. Until it is
fixed, you can connect via an alternate ftp port:
Example:
% ftp
ftp> open ftp.ics.uci.ed 5701
ftp> ...
The problem with the regular server should be resolved within a week
or so.
Mark
Path: ucivax!gateway
From: Steve_A_Hales@cup.portal.com
Subject: Floating Palettes
Message-ID: <9209021613.1.26193@cup.portal.com>
Newsgroups: fa.think-c
X-Origin: The Portal System (TM)
Lines: 28
Date: 2 Sep 92 23:14:06 GMT
The old tired and worn "Floating Palette" Subject.
I have some code that doesn't quite work, not sure where I got it. I been
hacking at it for awhile. Does anyone have anything they would be willing to
share, or I'd be willing to send what I have for public smashing, just to get
something that everyone could use.
I need a library that would do the following:
% Support multiple windows
% Be easy to use. Simple API One call to add a window, one call to remove a window
% Be in straight Think C, not in object C
What I have now replaces the following functions: FrontWindow SelectWindow
DragWindow ShowWindow HideWindow
I've added these to manipulate all the windows at once: ShowFloatingWindows
HideFloatingWindows
It originally started with support for only three windows, or course I needed
four, so my mods sort of work, but there are a few strange bugs.
Thanks for the bandwidth.
Aloha,
Steve Hales
Path: ucivax!gateway
From: hasmail!bryan@uu2.psi.com (Bryan Schmersal)
Subject: Please Remove Me
Message-ID: <9209031112.AA02183@hasmail.has.COM>
Status: R
Newsgroups: fa.think-c
Lines: 9
Date: 3 Sep 92 13:39:32 GMT
Please remove me from your mailing list.
=========================================================
Bryan Schmersal Healthcare Affiliated Services
Systems Analyst 681 Andersen Drive, Foster Plaza #6
Program Management Pittsburgh, PA 15220
bryan@has.com (412)928-5969
=========================================================
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (aaron barnett)
Subject: Books?
Message-ID: <01GOCG5V4RVM935QHX@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 3
Date: 3 Sep 92 15:40:32 GMT
X-Envelope-to: think-c@ics.uci.edu
im consifering buying inside mac VI (about time) and maybe macintosh
programming secrets. the later has been recomended but im not sure what
it covers? any comments on either?
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (aaron barnett)
Subject: sprites
Message-ID: <01GOCG7QJ1K28WX9JV@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 4
Date: 3 Sep 92 15:40:35 GMT
X-Envelope-to: think-c@ics.uci.edu
anyone got an implimentation for sprites of any sort. i don't need full
animation, just one fairly small animated object on a stationary backround.
the object will be moving around too.
thanks.
Path: ucivax!gateway
From: ST202153@brownvm.brown.edu (Andrew Shearer)
Subject: Collision detection
Message-ID: <9209030900.aa14105@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 8
Date: 3 Sep 92 16:00:42 GMT
Does anyone have a good algorithm for two-dimensional collision detection?
I'm writing a physics simulation with several moving objects (all of them
rectangular, at least for now), and I'm sure there are more efficient and
accurate algorithms than the imperfect methods I've come up with.
Thanks for any help.
Andrew_Shearer@brown.edu
Path: ucivax!gateway
From: wwedel@uswest.com (Wally Wedel)
Subject: hypot for Think C
Message-ID: <9209031633.AA28728@westward.advtech.uswest.com>
Newsgroups: fa.think-c
Lines: 16
Date: 3 Sep 92 16:34:22 GMT
Does anyone have a hypot function for Think C which implements the overflow
and underflow results which BSD describes?
I would assume that the prototype would be
double hypot( double x, double y);
It would probably be useful to add to the TC archive since a lot of C
programs assume it's there and it isn't in Symantec's version.
Wally Wedel
U S WEST Communications
4001 Discovery Drive, Suite 370
Boulder, CO 80303
Internet: wwedel@uswest.com AppleLink: D5100 Voice: 303-541-6052
Path: ucivax!gateway
From: bradley@map.marc.usda.gov
Subject: Maximum Number of concurrent files open?
Message-ID: <9209031709.AA09140@map.marc.usda.gov>
Newsgroups: fa.think-c
Lines: 12
Date: 3 Sep 92 17:16:55 GMT
A Think-C 5.0 user here just called and he cannot seem to open more
than 13 files simultaneously. He is using ANSI standard file opens.
I looked in stdio.h and found the statement "define FOPEN_MAX 15".
Well, perhaps he has another file open that he didn't count? Anyway, can
he just change this to ... say 30... and then rebuild the ANSI library? If
not, how can he open at least 26 files?
Please respond to Rod email-->marc!rod@ecnpurdue.edu and a CC to
me->bradley@map.marc.usda.gov
Thanks is advance. I'm just now leaving for a few days R&R :-) :-)
:-) :-) :-)
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Maximum Number of concurrent files open?
Message-ID: <9209041235.AA06779@chaos.cs.brandeis.edu>
In-Reply-To: bradley@map.marc.usda.gov's message of 3 Sep 92 17:16:55 GMT <9209031709.AA09140@map.marc.usda.gov>
Newsgroups: fa.think-c
Lines: 23
Date: 4 Sep 92 12:36:01 GMT
>>>>> On 3 Sep 92 17:16:55 GMT, bradley@map.marc.usda.gov said:
> A Think-C 5.0 user here just called and he cannot seem to
> open more than 13 files simultaneously. He is using ANSI standard
> file opens. I looked in stdio.h and found the statement "define
> FOPEN_MAX 15". Well, perhaps he has another file open that he
> didn't count? Anyway, can he just change this to ... say 30... and
> then rebuild the ANSI library? If not, how can he open at least 26
> files?
The only real limit to the maximum number of open files is the Mac
File System itself. Under System 6, you're limited to a number that's
determined by the contents of your boot blocks (typically 40). Under
System 7, you're only limited by available memory.
Go ahead and change FOPEN_MAX to whatever you like. BTW, the other
three files that you're missing are stdin, stdout, and stderr.
-phil
----
Phil Shapiro Software Engineer
Language Products Group Symantec Corporation
Internet: phils@cs.brandeis.edu
Path: ucivax!gateway
From: Rich_Watts@dgc.ceo.dg.com
Subject: Book!
Message-ID: <9209041506.AQ00051@rtp41.rtp.dg.com>
Newsgroups: fa.think-c
Lines: 14
Date: 4 Sep 92 14:19:33 GMT
Sorry for the general post (I deleted the guys post).
Books
Microsoft Press has a Book: "C Programming by Example" for Macintosh
computers, using Think C. A Source Code Disk is included, which
covers building the basic Macintosh User Interface, and several
helpful hints. For $40.00 is may well be worth the price if your a
novice Mac Programmer like myself (or you may just want to read
various parts in your local bookstore =} ..
Happy Book Hunting
~~RW
Path: ucivax!gateway
From: Per.Mildner@csd.uu.se (Per Mildner)
Subject: Think Debugger & Desktop Textures 2.0 conflict
Message-ID: <199209041556.AA17262@groucho.csd.uu.se>
Newsgroups: fa.think-c
X-Charset: ASCII
Lines: 18
Date: 4 Sep 92 15:57:27 GMT
X-Char-Esc: 29
When I use a fancy color pattern (128x128) the debugger starts to eat
100k of its heap (as seen by Swatch). This occurs for every step o
peration after calling StandardGetFile (but in another project it
happened unrelated to StandardGetFile...). This behaviour is totally
repeatable.
This is on a MacII fx, 7.01 Swedish, Tune-Up 1.1.1, 32 bit addressing,
32 meg physical, no virtual, no inits (i.e., shift key at bootup), a
color startup pict, 3 monitors both color and B/W, several HDs. If I
revert to a Control-Panel compatible pattern then everything works
fine even with all my usual gazillion inits.
Regards,
Per Mildner perm@CSD.UU.SE
Computing Science Dept. tel: +46 18181049
Uppsala University, Sweden fax: +46 18521270
Path: ucivax!gateway
From: ephraim@think.com (Ephraim Vishniac)
Subject: What happened to FracMul, FracDiv, et al.?
Message-ID: <9209042021.AA03291@leander.think.com>
Newsgroups: fa.think-c
Lines: 9
Date: 4 Sep 92 20:21:56 GMT
I was just trying to recompile some old code and found that linking
failed because of the absence of FracMul, FracDiv, FracCos, and
FracSin. I can find these in Inside Mac (they're supposed to be
Toolbox Utilities), but not in any current header file or library.
Does anybody know what became of them?
Ephraim Vishniac ephraim@think.com ThinkingCorp@applelink.apple.com
Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142
Path: ucivax!gateway
From: cs10@cornell.edu (Chris Stuart)
Subject: unsigned short problem?
Message-ID: <199209042028.AA01979@postoffice.mail.cornell.edu>
Newsgroups: fa.think-c
Lines: 11
Date: 4 Sep 92 20:29:14 GMT
When I try to assign a number higher than 32767 to an unsigned short
variable it comes back in the negative range. Slap me if I'm wrong but
can't I assign in the range 0 to 65535 to an unsigned short variable? Is
there something I need to set in the compiler?
--------------------------------------
cs10@cornell.edu
Cornell Information Technologies
509 Olin Library, Cornell University
Ithaca, NY 14850
(607) 255-9099
Path: ucivax!gateway
From: rc05@gte.com (Ramesh Chandak)
Subject: Question : Appmaker and THINK C
Message-ID: <9209050052.AA01725@bunny.gte.com>
Newsgroups: fa.think-c
Lines: 27
Date: 5 Sep 92 00:53:02 GMT
Folks,
Very simple questions. First time user of AppMaker with THINK C.
I have defined few windows and menu bar items using AppMaker. Then
I let it generate code in THINK C. It compiles fine. One other thing
I have done is cut and paste pictures ( PICT Files ) from the ScrapBook
onto some of the windows.
So the scenario is like this ;
When you fire up the application, there is a pictorial tool palette on
the LHS. So there are 3 to 4 PICTs on the LHS. WHat I want to do is
click on a PICT and go to another window. And if I click on a different
PICT, I want to go to a different window. But the code that has
been generated includes only one procedure called MouseInWindow where
I have written the code to be able to jump to another window. So the
way it works now is no matter where i can click on the window, it goes
to the same one window.
The code that was generated using AppMaker utilizes the procedural stationary.
Anyone out there in the networld can help me with this ? Any idea what's
going on and what's the problem ?
Any help in this regard will be highly appreciated. Thanx much in advance.
- Ramesh M. Chandak
rc05@gte.com
Path: ucivax!gateway
From: zkessin@chaos.cs.brandeis.edu (Zach Kessin)
Subject: threads and stdio
Message-ID: <9209050305.AA03281@chaos.cs.brandeis.edu>
Newsgroups: fa.think-c
Lines: 18
Date: 5 Sep 92 06:40:54 GMT
I am using the threads package with the stdio.h lib. What I would like
(need) to do is have each thread have a separate set of files for each
thread. That way I can have thread one with one set of redirections
and thread 2 with its own set, with the switch method keeping track of
it all. How can I set it so that file's # 0 and 1 are switched in and
out?
Thanks for the help
--Zach Zkessin@chaos.cs.brandeis.edu
There are worlds out there where the sky is burning. The sea's
asleep, and the rivers dream. People made of smoke and cities made of sound.
Somewhere there's danger. Somewhere there's injustice.
Somewhere else the tea's getting cold. Come on Ace, we've got work to do."
-The Doctor "Survival"
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca ("David A. Denboer")
Subject: C problem
Message-ID: <9209070418.AA24428@ccu.UManitoba.CA>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 16
Date: 7 Sep 92 04:18:27 GMT
For some stupid reason, this followinf piece of code does not compile anymore.
OffsetRect(&dispBounds, -dispBounds.left, -dispBounds.top);
In one project, it compiles fine.
If I move the code to another project, it will not compile again. It says
"Syntax Error", and my C compiler does not seem to know what a Rect is?!!!
I have all the correct #includes, as it does work in one project, but not in
any other. I checked the Compiler options, and they are also the same from
project to project.
Has anyone else had this problem?
Thanks for any help!
--
David A. denBoer
Musi Computer Products
umdenbo0@ccu.umanitoba.ca
Path: ucivax!gateway
From: cs10@cornell.edu (Chris Stuart)
Subject: Answer to unsigned short problem
Message-ID: <199209071300.AA25176@postoffice.mail.cornell.edu>
Newsgroups: fa.think-c
Lines: 41
Date: 7 Sep 92 13:00:42 GMT
I got a number of responses to my question on why an unsigned short didn't
seem to be accepting a number between 32,767 and 65,535. I wasn't using a
printf statement so the answer was not that I needed to specify it with a u
instead of a d, but I was looking at it in the debugger, and from Steve
Williams answer below, it seems that the Think-C debugger will not display
an unsigned short in decimal format in the correct manner. You have to
typecast it in the data window in order to see it's true value. Which
brings up the question of just how does Think-C represent unsigned shorts.
Anyway, thanks again for everyone's help:
>Chris,
>
>You are correct that an unsigned short should hold values [0..65535], and as
>far as I can tell, it is perfectly legal to write (in C code)
>
>unsigned short ux = 40000; // a number too big for signed short
>
>However, there are two gotchas (and from your letter, I gather that one or the
>other of these things is bugging you):
>
>1. If you try to print ux through the printf() routine with a "%d" format
> specifier, it will print as -25536, because %d is for signed integers. You
> will have to use "%u" to get it to print as you intend.
>
>2. if you ask the THINK C debugger to show you the contents of 'ux' as a
> decimal value, it will display as -25536. To see it in decimal as you
> intend it, cast it to either (long) or (unsigned long).
>
>Hope that helps
>
>Steve Williams
>williamssp@gtewd.mtv.gsc.gte.com
>
>
--------------------------------------
cs10@cornell.edu
Cornell Information Technologies
509 Olin Library, Cornell University
Ithaca, NY 14850
(607) 255-9099
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Answer to unsigned short problem
Message-ID: <9209071634.AA24870@chaos.cs.brandeis.edu>
In-Reply-To: Chris Stuart's message of 7 Sep 92 13:00:42 GMT <199209071300.AA25176@postoffice.mail.cornell.edu>
Newsgroups: fa.think-c
Lines: 23
Date: 7 Sep 92 16:34:30 GMT
>>>>> On 7 Sep 92 13:00:42 GMT, Chris Stuart <cs10@cornell.edu> said:
> I got a number of responses to my question on why an unsigned short
> didn't seem to be accepting a number between 32,767 and 65,535. I
> wasn't using a printf statement so the answer was not that I needed
> to specify it with a u instead of a d, but I was looking at it in
> the debugger, and from Steve Williams answer below, it seems that
> the Think-C debugger will not display an unsigned short in decimal
> format in the correct manner. You have to typecast it in the data
> window in order to see it's true value. Which brings up the
> question of just how does Think-C represent unsigned shorts.
THINK C uses two's complement binary to represent integers (see the
User Manual, p. 427). The THINK Debugger currently only knows how to
format unsigned numbers as hexadecimal; hopefully this will be
addressed in a future release.
-phil
----
Phil Shapiro Software Engineer
Language Products Group Symantec Corporation
Internet: phils@cs.brandeis.edu
Path: ucivax!gateway
From: wdh@well.sf.ca.us (Bill Hofmann)
Subject: Re: What happened to FracMul, FracDiv, et al.?
Message-ID: <199209072003.AA19317@well.sf.ca.us>
Newsgroups: fa.think-c
Lines: 4
Date: 7 Sep 92 20:03:55 GMT
#include <FixMath.h>
ought to do it.
-Bill Hofmann
Path: ucivax!gateway
From: R.Pugmire@massey.ac.nz
Subject: CURSES for think-C
Message-ID: <9209082217.AA11744@cc-server4.massey.ac.nz>
Newsgroups: fa.think-c
Lines: 7
Date: 8 Sep 92 22:17:35 GMT
I am converting a package to the mac. The package uses the CURSES library.
My question is does CURSES exist for thinkC on the mac or is it a matter of
making use of the console routines?
Ralph Pugmire
R.Pugmire@massey.ac.nz
Path: ucivax!gateway
From: Jean-Marie.Laborde@imag.fr (Jean-Marie Laborde)
Subject: caretHook wanted
Message-ID: <9209090935.AA25080@imag.imag.fr>
Newsgroups: fa.think-c
Lines: 42
Date: 9 Sep 92 09:36:48 GMT
I need to change the appearance of the caret for some TErecord.
I manage changing HighHook following the example from insid I p 379.
e.g.
void bidon(void){
asm{
move.l (sp),a0 ;
move.w OFFSET(Rect,top)(a0),mrr.top
move.w OFFSET(Rect,left)(a0),mrr.left ; not really needed
move.w OFFSET(Rect,right)(a0),mrr.right ; not really needed
move.w OFFSET(Rect,bottom)(a0),mrr.bottom ; not really needed
;
move.w mrr.bottom,mrr.top
subq #1,mrr.top
move.w mrr.top,OFFSET(Rect,top)(a0)
;
_InvertRect
}
}
with
extern ProcPtr bidon, bidonCar;
(*macTE)->highHook=&bidon;
But unfortunately the equivalent method for CaretHook does not work:
it crashes when returning. What to do ???
Thank you for any help!
Jean-Marie Laborde laborde@imag.fr
Laboratoire de Structures Discretes et de Didactique - IMAG
Universite Joseph Fourier - CNRS BP 53x 38041 Grenoble cedex
FRANCE
(33) 76 51 46 10 (sec 76 51 46 16) (fax 76 51 45 55)
Path: ucivax!gateway
From: bobm@imagine.convex.com (Bob Miller)
Subject: Please desubscribe me.
Message-ID: <9209092008.AA19713@imagine.convex.com>
Newsgroups: fa.think-c
X-Quote-Of-The: All programmers write at least as well as Faulkner. Most are
as good as Proust, and about a third are as good as Dickens.
Several hundred are at least as good as Shakespeare. So the
manuals you thought were inferior were simply beyond your poor
ability to appreciate. If you were a programmer, you would
delight in their verbal virtuosity.
-- probably not Niklaus Wirth
Organization: The GrapE-ics Lab
Lines: 8
Date: 9 Sep 92 20:09:17 GMT
Please remove me from the think-c mailing list.
I'm changing jobs and this address won't be valid much longer.
Soon my address will end "@apple.com". Yay!
Thanks.
K<bob>
Path: ucivax!gateway
From: rc05@gte.com (Ramesh Chandak)
Subject: (none)
Message-ID: <9209092220.AA29631@bunny.gte.com>
Newsgroups: fa.think-c
Lines: 16
Date: 9 Sep 92 22:20:46 GMT
Hi,
Okay here's the problem. I have PICT resources pasted onto one window
of this application that I am trying to build. What I want to do is simple :
cut one PICT resource and paste it onto another window. I think I should
use COPYBITS to do that. But I am confused as to what arguments should I
pass on to COPYBITS. How do take the PICT resource's portbits ? I mean
how do I access them ?
Any help in this regard will be much appreciated. If possible, please email
your responses to Ramesh at rc05@gte.com. Thanx much.
- Ramesh
Path: ucivax!gateway
From: mcmurray@uliisa.unil.ch (Elaine)
Subject: Think-C user in Switzerland...
Message-ID: <9209100149.aa06265@q2.ics.uci.edu>
Newsgroups: fa.think-c
X-Vms-To: ULGW::"think-c@ics.uci.edu"
Lines: 17
Date: 10 Sep 92 08:49:57 GMT
Bonjour!
I have recently started using Think-C and I am interested in the
discussions of your group. Would you please include my name and
address in your conference?
Thank you.
A/~~\A
Elaine McMurray - Universite de Lausanne - Switzerland ((O O))___
\ / ~~~
# # # (--)\ #
--#---x---x---x---x---x---#---x---x---x---x---x---#---x---x---x---x---x---#---
# # # \ #
--#---x---x---x---x---x---#---x---x---x---x---x---#---x---x---x---x---x---#---
\#// \|/ \\\|||// \#/ \\\||/ \||/// \\#|// \\\\\|||/// \|/#\|
Path: ucivax!gateway
From: evans@natural.com (Christopher Evans)
Subject: dcmds in Think C
Message-ID: <9209101234.AA11706@natural.com>
Newsgroups: fa.think-c
Lines: 20
Date: 10 Sep 92 12:51:48 GMT
I am trying to write a dcmd in Think C and I'm having a heck
of a time. Has anyone done this? What libraries are necessary? This
one uses some ANSI calls (sprintf primarily) and a toolbox call (BitTst)
so I probably need a ANSI-A4 and MacTraps but I get all sorts of
link errors when I add converted .o files from MPW that come on the
developer disks.
Any ideas?
<==================================Q======================================>
Chris Evans | Internet: evans@natural.com
Development | Phone: 617-876-4876
Natural Intelligence, Inc. | FAX: 617-492-7425
2067 Massachusetts Avenue | AppleLink: NATURAL
Cambridge MA 02140 | or evans@natural.com@INTERNET#
Modern man is the missing link between apes and human beings.
Path: ucivax!gateway
From: TPZ4@vm.cnuce.cnr.it (Rodolfo Cardarelli)
Subject: Any other think-c fan in Italy?
Message-ID: <9209100729.aa08408@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 7
Date: 10 Sep 92 14:29:38 GMT
I'm curious to know whether there's any other Think-c user here around
Especially somebody who's, like me, learning how program on Mac
Thanks
Rodolfo Cardarelli
TPZ4@ICNUCEVM.CNUCE.CNR.IT
Path: ucivax!gateway
From: gilmore@venice.sedd.trw.com (Larry Gilmore)
Subject: emove me please
Message-ID: <9209101718.AA23253@venice.sedd.trw.com>
Newsgroups: fa.think-c
Lines: 7
Date: 10 Sep 92 17:19:09 GMT
Please remove me from the think-c mailing list.
Larry A. Gilmore Internet: gilmore@venice.sedd.trw.com
TRW SEDD, DH1/2849
P.O. Box 6213 Phone: (310)764-3318
Carson, CA 90746 Fax: (310)764-3946
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca
Subject: GWorld problems...
Message-ID: <9209101845.AA19984@scotty.cc.umanitoba.ca>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 14
Date: 10 Sep 92 18:45:34 GMT
I am having a few problems with OffScreen GWorlds and drawing into them.
If anyone has any source code on creating one, Drawing into it, and then
displaying the thing, could you pleas let me have it!!!!!!"!!!
I am trying to get a PICT to appear in the screen faster than a simple call
to DrawPicture... The few times I have tried to create a GWorld, the
program crashes. (THINK C 5.02 Sys 7.01 tuner 1.1.1)
Thanks for any help
--
David A. denBoer
Musi Computer Products
David_denBoer@UManitoba.CA (or umdenbo0@ccu.umanitoba.ca)
Path: ucivax!gateway
From: abboud@cedrus.cedrus.com ("Hisham A. Abboud")
Subject: Looking for a dBase library
Message-ID: <9209102101.AA06098@cedrus.com>
Newsgroups: fa.think-c
Lines: 16
Date: 10 Sep 92 23:13:29 GMT
Hi everyone,
I am looking for a library of functions that lets me create and
manipulate dBase III compatible databases. I am NOT looking for
an interactive application like FoxBase, but rather something
I can call from Think C. Anyone aware of a source of such thing?
Thanks.
Hisham.
Hisham A. Abboud, Cedrus Corp. [Internet: abboud@cedrus.com]
Path: ucivax!gateway
From: carlpe@microsoft.com (Carl Peterson)
Subject: RE: Looking for a dBase library
X-Msmail-Conversation-Id: 6952EA49
Message-ID: <9209110700.AA04719@outmail.microsoft.com>
Newsgroups: fa.think-c
X-Msmail-Wiseremark: Microsoft Mail -- 3.0.729
Lines: 31
Date: 11 Sep 92 14:48:11 GMT
X-Msmail-Message-Id: 6952EA49
Sorry I don't, but if you find a site or code could you fill me in on it too.
Thanks,
Carl
carlpe@microsoft.com
----------
From: "Hisham A. Abboud" <netmail!abboud@cedrus.cedrus.com>
To: <think-c@ics.uci.edu>
Subject: Looking for a dBase library
Date: Thursday, September 10, 1992 11:13PM
Hi everyone,
I am looking for a library of functions that lets me create and
manipulate dBase III compatible databases. I am NOT looking for
an interactive application like FoxBase, but rather something
I can call from Think C. Anyone aware of a source of such thing?
Thanks.
Hisham.
Hisham A. Abboud, Cedrus Corp. [Internet: abboud@cedrus.com]
Path: ucivax!gateway
From: nagel@buckaroo.ICS.UCI.EDU (Mark Nagel)
Subject: ARCHIVE: new Arashi available
Message-ID: <16949.716222683@buckaroo.ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: nagel@ics.uci.edu
Lines: 52
Date: 11 Sep 92 14:48:12 GMT
------- Forwarded Message
Date: Wed, 09 Sep 92 20:44:21 +0000
From: Juri Munkki <jmunkki@vipunen.hut.fi>
To: think-c-request@ics.uci.edu
Subject: Arashi
I just put a new version of the Arashi archive in the incoming directory.
The main reason for this is that a file was missing. The missing file
has always been in the sound kit archive, so those who already have it
do not necessarily need the new archive.
I added a short utility program for maintaining the copyright notices
in the source files and I used the program to change the copyright
comments.
Here's the missing file:
/*/
Project Arashi/STORM: StdInit.c
Major release: 9/9/92
Last modification: Wednesday, September 9, 1992, 21:39
Created: Thursday, April 23, 1987, 17:38
Copyright 1987-1992, Juri Munkki
/*/
#define STACKSPACE 32768L
void DoInits()
{
SetApplLimit(GetApplLimit() - (STACKSPACE - DefltStack));
InitGraf(&thePort);
InitCursor();
InitFonts();
InitWindows();
InitMenus();
TEInit();
InitDialogs(0L);
InitCursor();
MaxApplZone();
}
// Juri Munkki, jmunkki@hut.fi
------- End of Forwarded Message
[saved as: /mac/think-c/code/Arashi_Source.cpt.bin; 856K]
Path: ucivax!gateway
From: stauffer@cc.swarthmore.edu (Glenn Stauffer)
Subject: Re: Looking for a dBase library
Message-ID: <9209111510.AA18667@oak.cc.swarthmore.edu>
Newsgroups: fa.think-c
Lines: 20
Date: 11 Sep 92 15:11:05 GMT
>Hi everyone,
>
>I am looking for a library of functions that lets me create and
>manipulate dBase III compatible databases. I am NOT looking for
>an interactive application like FoxBase, but rather something
>I can call from Think C. Anyone aware of a source of such thing?
>
>Thanks.
>
> Hisham.
>
>Hisham A. Abboud, Cedrus Corp. [Internet: abboud@cedrus.com]
Check out comp.lang.c and comp.lang.c++. Someone just posted code to do
this to a degree using either C or C++ (didn't look at it, though I did
save it). The posting is in 4 parts with code, header file, and sample
apps.
STAUFFER
Path: ucivax!gateway
From: sje@xylos.ma30.bull.com ("Steven J. Edwards")
Subject: TC 5.0.3 upgrade patch
Message-ID: <9209111811.AA05596@xylos.ma30.bull.com>
Newsgroups: fa.think-c
Reply-To: sje@xylos.ma30.bull.com
Received-Date: Fri, 11 Sep 92 14:11:08 EDT
Lines: 12
Date: 11 Sep 92 18:08:19 GMT
The comp.sys.mac.programmer newsgroup had a brief mention of a
publicly available upgrade patch fo TC 5.0.3. Has anyone here had
experience with this patch? What do the release notes, if any, say
about this? How is it different from TC 5.0.2?
An upgrade to the TCL was also mentioned.
[The above opinions expressed are my own; not necessarily held by others.]
== Steven J. Edwards Bull HN Information Systems Inc. ==
== (508) 294-3484 300 Concord Road MS 820A ==
== sje@xylos.ma30.bull.com Billerica, MA 01821 USA ==
"That Government which Governs the Least, Governs Best." -- Thomas Jefferson
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: TC 5.0.3 upgrade patch
Message-ID: <Mailstrom.B54.44803.9528.de19@umail.umd.edu>
In-Reply-To: Your message <9209111811.AA05596@xylos.ma30.bull.com> of 11 Sep
92 18:08:19 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 19
Date: 12 Sep 92 00:15:58 GMT
I spoke to symantec ts today, and they refered me to this posting on the csmp
newsgroup, which I forward to you fellow ThC addicts. According to ts, nothing
major is added :-(, just fixes some quadra and optomiser buggyness.
----
An new update for THINK C, 5.0.3, has been released. This update corrects
problems with the Quadra and other problems present in earlier versions of the
compiler. Also available is TCL 1.1.2 (the same as that released in 5.0.2).
The patch is available on AOL, CompuServe, and AppleLink, and will be
available on sumex-aim.stanford.edu in the very near future.
Tom
--
Tom Emerson Technical Support
Language Products Group Symantec Corporation
Internet: tree@uvm.edu
Path: ucivax!gateway
From: Rich_Watts@dgc.ceo.dg.com
Subject: Unix Archive??
Message-ID: <9209122154.AB00037@rtp41.rtp.dg.com>
Newsgroups: fa.think-c
Lines: 10
Date: 12 Sep 92 20:58:05 GMT
Sorry to post this here
I have this stubborn archive "[file].tar.Z" and I am trying to
uncompress it and pull it over to my mac, and the UNIX DOG will not
let me... Could someone please (I know you probably get 50 questions
like this a week) let me know how to do this.
Thanks in advance
Path: ucivax!gateway
From: morris@think.com (Harry Morris)
Subject: sublaunching
Message-ID: <9209130705.AA13654@quake.think.com>
Newsgroups: fa.think-c
Lines: 11
Date: 13 Sep 92 07:08:48 GMT
Hi! I'm trying to write a program which launches another program (and
document) in Think C, system 6. Does anyone have a code fragment they
could share? I've seen TN 128, but haven't gotten it working.
thanks!
Harry
(morris@think.com)
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: Re: Unix Archive??
Message-ID: <9209130346.aa19104@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 29
Date: 13 Sep 92 10:46:47 GMT
>Sorry to post this here
>I have this stubborn archive "[file].tar.Z" and I am trying to
>uncompress it and pull it over to my mac, and the UNIX DOG will not let me
do binary FTP from UN*X machine to mac (Fetch 2.1 is my favourite FTP'er)
run MacCompress (set Format to UNIX compress)
I use Stuffit Deluxe 2 to untar, but in PD you could try tar-30 or suntar
Both Fetch & MacCompress3.2 are available from SUMEX-AIM amongst other
quality
FTP sites. Of course you could uncompress/untar on the UN*X machine first
with "tar -xf <filename>" and FTP the result onto your mac, but check "man
tar"
cheers,
X500: @c=AU [I'm about to update VTHRC entries, soon...]
@o=University of Queensland
@ou=Physiology and Pharmacology Department
@ou=Vision Touch and Hearing
@cn=Danny Thomas
@rfc822Mailbox=vthrc@cc.uq.oz.au
PS I'm hoping that SD 3 includes a Compress capability.
PPS in the near future you would be able to drag the file onto a
uncompress/untar FilterTop module. That is being developed by a group of
enthusiasts under the aegis of TopSoft Inc. and will be freely released
with source. A range of filter/translation modules will be supplied but it
is quite easy to add your own. FTP site: syrinx.kgs.ukans.edu /topsoft
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (Aaron Barnett)
Subject: iconMask -> Rgn?
Message-ID: <01GOFL75YHWI935QPK@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 35
Date: 14 Sep 92 13:19:01 GMT
X-Envelope-to: think-c@ics.uci.edu
Hello,
I need to know if a point on screen is touching an icon (the mask).
the best would be if i could convert the icon mask to a Rgn. Since
i coudn't figure out how to do that i wrote this function.
"theIconMask" is a bitmap. uh, it kinda works.
Boolean hit(short x,short y)
{
Point theHit;
thePoint.h = x;
thePoint.v = y;
if ( PtInRect ( thePoint, &theIconRect ) ) {
/*here i put x & y in local to bitmap coordinates*/
x -= theIconRect.left;
y -= theIconRect.top;
/*here's where things get nuts*/
if((*theIconMask.baseAddr+(y*4)+(x/8))&(x%8))
/*(y*4) for columns in an icon*/
/*(x/8) to go to appropriate columns*/
/*(x%8) bit within column*/
return true;
}
return false;
}
anyone?
either fixing the function or converting icon to Rgn would do it?
ps i also tried
if((*(theIconMask.baseAddr+(y*4)+(x/8)))&(x%8))
aaron
Path: ucivax!gateway
From: kirk_crawford@qm_smtp_gw4.aero.org (Kirk Crawford)
Subject: Re: sublaunching
Message-ID: <9209141559.AA04700@marvin.aero.org>
Posted-Date: 14 Sep 92 08:59:24 U
Newsgroups: fa.think-c
Lines: 91
Date: 14 Sep 92 16:01:45 GMT
Subject: RE>sublaunching
Harry Morris writes:
HM> Hi! I'm trying to write a program which launches
HM> another program (and document) in Think C, system 6.
HM> Does anyone have a code fragment they could share?
HM> I've seen TN 128, but haven't gotten it working.
I write utility programs for Second Sight BBS's and we do sublaunching all the
time. Here is the code I use. It works under System 6 and 7.
typedef struct LaunchStruct{
Ptr appName; /* name of the launchee */
short memUse; /* config param */
char LC[2]; /* extended parameters */
long extBlocLen; /* bytes in extension (6) */
short fFlags; /* finder file info flags */
long launchFlags; /* bit 31,30 == 1 for sublaunch */
}LaunchStruct,*pLaunchStruct;
pascal OSErr LaunchIt(pLaunchStruct pLnch)
= {0x205F, 0xA9F2, 0x3E80};
/* pops pointer into A0, calls Launch, pops D0 error code into result:
MOVE.L (A7)+,A0
_Launch
MOVE.W D0,(A7) ; since it MAY return */
OSErr LaunchBBS(unsigned char *FileName, short MyvRefNum, Boolean subLaunch)
/* Sublaunch if true and launch if false */
{ /* DoLaunch */
struct LaunchStruct myLaunch;
HFileInfo myPB;
unsigned char *dirNameStr;
Str255 s;
OSErr err;
unsigned long sleep=10;
short i;
EventRecord event;
dirNameStr = FileName; /*initialize to file selected*/
/*Get the Finder flags*/
myPB.ioNamePtr= (StringPtr)dirNameStr;
myPB.ioVRefNum= MyvRefNum;
myPB.ioFDirIndex= 0;
myPB.ioDirID = 0;
if((err = PBGetCatInfo((CInfoPBPtr) &myPB,false))){
sprintf(s,"ERROR %d on PBGetCatInfo of %s",err,PtoCstr(FileName));
CtoPstr(FileName);
Log(s);
return(err);
}
/*Set the current volume to where the target application is*/
if((err = SetVol(nil, MyvRefNum))){
sprintf(s,"ERROR %d on SetVol",err);
Log(s);
return(err);
}
/*Set up the launch parameters*/
myLaunch.appName = (Ptr)FileName; /*pointer to our fileName*/
myLaunch.memUse = 0; /*we don't want alternate screen or sound buffers*/
myLaunch.LC[0] = 'L'; /*set up LC so as to tell Launch that there is
non-junk next*/
myLaunch.LC[1] = 'C';
myLaunch.extBlocLen = 6; /*length of param. block past this long word*/
/*copy flags; set bit 6 of low byte to 1 for RO access:*/
myLaunch.fFlags = myPB.ioFlFndrInfo.fdFlags; /*from _GetCatInfo*/
/* Test subLaunch and set launchFlags accordingly */
if ( subLaunch )
myLaunch.launchFlags = 0xC0000000; /*set BOTH hi bits for a sublaunch */
else
myLaunch.launchFlags = 0x00000000; /* Just launch then quit */
err = LaunchIt(&myLaunch); /* call _Launch */
if(subLaunch)
for(i=0; i<20; i++)
WaitNextEvent(everyEvent, &event, sleep, 0L);
if(err < 0){
/* the launch failed, so put up an alert to inform the user */
sprintf(s,"ERROR %d on LaunchIt",err);
Log(s);
return(err);
} else
return noErr;
} /*DoLaunch*/
Path: ucivax!gateway
From: mikew@kpc.com
Subject: Re: Unix Archive??
Message-ID: <9209141647.AA12011@nu.kpc.com>
In-Reply-To: Your message of "12 Sep 92 20:58:05 GMT."
<9209122154.AB00037@rtp41.rtp.dg.com>
Newsgroups: fa.think-c
Lines: 5
X-Mts: smtp
Date: 14 Sep 92 16:46:45 GMT
compress -d file.tar.Z
will create file.tar
tar xvf file.tar.Z will create all the files contained
in file.tar.
Then just send them to the mac.
Path: ucivax!gateway
From: swenson%john.Berkeley.EDU@ucbvax.berkeley.edu
Subject: Re: iconMask -> Rgn?
Message-ID: <9209141759.AA04174@john.berkeley.edu>
Newsgroups: fa.think-c
Lines: 14
Date: 14 Sep 92 18:04:19 GMT
> I need to know if a point on screen is touching an icon (the mask).
>the best would be if i could convert the icon mask to a Rgn. Since
>i coudn't figure out how to do that i wrote this function.
>"theIconMask" is a bitmap. uh, it kinda works.
There is a new function described in IM VI called BitMapToRegion which
sounds like it would do exactly what you want. Depending on the system
software requirements of your application, this seems like the easiest way
to go.
Kirk Swenson
UC Berkeley
swenson@john.berkeley.edu
Path: ucivax!gateway
From: mjs@genetics.wisc.edu (Mike Schmelzer)
Subject: Unix Archive??
Message-ID: <9209151449.AA07370@behemoth.genetics.wisc.edu>
In-Reply-To: mikew@kpc.com's message of 14 Sep 92 16:46:45 GMT <9209141647.AA12011@nu.kpc.com>
Newsgroups: fa.think-c
Lines: 9
Date: 15 Sep 92 14:53:37 GMT
Or..
zcat file.tar.Z | tar xvf -
..if you're a little short on disk space.
But I suspect the problem was lack of access to un*x in the first place...
--
Mike Schmelzer, mjs@genetics.wisc.edu, (608)262-4550
I'm just a methodical guy in an interrupt-driven world.
Path: ucivax!gateway
From: morris@think.com (Harry Morris)
Subject: more on sub-launching
Message-ID: <9209152101.AA16389@quake.think.com>
Newsgroups: fa.think-c
Lines: 23
Date: 15 Sep 92 21:05:38 GMT
thanks to everyone who sent suggestion son sub-lanuching. I think I've
gotten sub-launching pretty much working now!
However, I've got a document I need to launch, I know it's name, type, and
creator. I've set up the AppParmHandle to point to my file, and that works
fine. Two problems remain though. I'd appreciate any help I can get.
1) I need to figure out which app to launch, given a type and creator.
This is probably normally done by the finder. I think the necessary info
is in the desktop file, but TN 29 says not to rely on that. Is there any
kosher way to do this?
2) When I launch an app (say, MSWord) with a doc, it opens the doc, and
becomes the frontmost app. But then if I switch back to my app, and try to
launch another doc in the same app, the app becomes frontmost, but the
second do is not loaded. Any idea how do this? I've seen OnLocation do
it.
thanks!
Harry Morris
morris@think.com
Path: ucivax!gateway
From: kirk_crawford@qm_smtp_gw4.aero.org (Kirk Crawford)
Subject: Re: more on sub-launching
Message-ID: <9209152145.AA10617@marvin.aero.org>
Posted-Date: 15 Sep 92 14:43:31 U
Newsgroups: fa.think-c
Lines: 31
Date: 15 Sep 92 21:46:16 GMT
Subject: RE>more on sub-launching
HM> 1) I need to figure out which app to launch, given a
HM> type and creator. This is probably normally done by
HM> the finder. I think the necessary info is in the
HM> desktop file, but TN 29 says not to rely on that. Is
HM> there any kosher way to do this?
I think there may be a new command to do this in System 7, but under system 6,
the only way I know of is to march the disk(s) searching for applications and
check the creator against the one you are looking for. A dirty approach, but
it will work. You may want to ask the user to find the application for you and
then remember it. That is what OnQue did when it lost track of the
applications for a file. (you would have to remember the directory ID, File
Name and Volume Name.)
HM> 2) When I launch an app (say, MSWord) with a doc, it
HM> opens the doc, and becomes the frontmost app. But then
HM> if I switch back to my app, and try to launch another
HM> doc in the same app, the app becomes frontmost, but
HM> the second do is not loaded. Any idea how do this?
HM> I've seen OnLocation do it.
Under system 7 use AppleEvents to do this. Under System 6, you would have to
trick the application, the way MultiFinder did it. You would need to post
events to the application to get it to choose the open item from the file menu
and then patch the SFGetFile trap to paste in your filename and vRefNum. Way
too hard under system 6. I would stick with System 7 and Apple Events.
Path: ucivax!gateway
From: jimlynch@netcom.com (Jim Lynch)
Subject: ?How to keep the PrJob dialog from changing nbr of copies to 1?
Message-ID: <9209160953.AA00684@netcom.netcom.com>
Newsgroups: fa.think-c
Lines: 9
Date: 16 Sep 92 09:54:23 GMT
Hi gang...
Is there a call that won't reset the number of copies or the page range? I
have misplaced my copy of Inside Mac 5 for the moment; I checked all others.
If there is no such call, is there a *_device independant_* way to do it?
Thanks,
Jim (jimlynch@netcom.com)
Path: ucivax!gateway
From: rc05@gte.com (Ramesh Chandak)
Subject: (none)
Message-ID: <9209180055.AA22626@bunny.gte.com>
Newsgroups: fa.think-c
Lines: 22
Date: 18 Sep 92 00:56:13 GMT
Hi there :
I'm trying to implement lasso. I'm using THINK C compiler. What I have is
this :
A picture on one of the windows. What I do is define a region inside the
picture using rubber-banding. This works fine so far.
But now I want to be able to cut that region, delete the remaining part
of the picture and then paste back the region. Following which I want to be
able to generate handles to that region and be able to move it.
I'm using the functions OpenRgn and CloseRgn to define the region. Thereafter,
I'm using CalcMask and CopyMask to implement the rest of the functionality.
However, I'm confused about the arguments that need to be passed to these
functions. Any ideas how I can do this ?
Please email your responses to Ramesh at rc05@gte.com. Thanx well in
advance.
- Ramesh
Path: ucivax!gateway
From: kw27+@andrew.cmu.edu (Kip Walker)
Subject: Remove from list...
Message-ID: <QeiJwLS00WBK09t5lb@andrew.cmu.edu>
Newsgroups: fa.think-c
Lines: 11
Date: 18 Sep 92 04:47:03 GMT
kw27+@andrew.cmu.edu!
Thanks...
Kip Walker
----------------------------+
kwalker+@cmu.edu | "Here's your I.D.,
kw27+@andrew.cmu.edu | ideal for identifying one and all."
kip@drycas.club.cc.cmu.edu | -Jethro Tull
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Changing the background pattern...
Message-ID: <920921174952.2040cc04@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 21 Sep 92 21:53:31 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
Any information on how to change the background pattern? (Stored
at ppat 16 in the system file.) I was thinking, if you could change the
low memory global that contained the ppat pattern, and then called InitGraf
or InitWindows or something, it would redraw the background, but if there
is an easier (read: better, less evil) way to do this, (I don't even know
if that works!) please let me know. Another important matter, at what
location is the bafckground pattern stored in memory? (I assume that a whole
pix map the size of the screen is kept somewhere in memory!)
Anything you know would be really great. Thanks...
Path: ucivax!gateway
From: kw27+@andrew.cmu.edu (Kip Walker)
Subject: REMOVE ME FROM THE LIST PLEASE
Message-ID: <UejaCom00iUyM_DEx8@andrew.cmu.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 22 Sep 92 01:04:56 GMT
kw27+@andrew.cmu.edu
Thank you!
Kip Walker
----------------------------+
kwalker+@cmu.edu | "Here's your I.D.,
kw27+@andrew.cmu.edu | ideal for identifying one and all."
kip@drycas.club.cc.cmu.edu | -Jethro Tull
Path: ucivax!gateway
From: pchang@cs.stanford.edu (The Weasel)
Subject: Think C Debugger vs Large ppat's
Message-ID: <9209220303.AA29245@Xenon.Stanford.EDU>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 19
Date: 22 Sep 92 03:03:31 GMT
Hello All,
I was just wondering if anybody knows if it is true that the Think C
debugger does not get along with any manipulations of the system's
ppat, or whatever the resource is that is the desktop's pattern I
sort of forget. If this is not true, could somebody give me a hint
why a program would work fine w/o the debugger and w/ the debugger w/o
changing the system's pattern, but fail w/ the debugger and a large
system pattern.
I hope somebody out there knows what I'm talking about. I would hate
to think that I'm loosing my mind.
Peter
--
Peter Chang | "My doctor says that I have a malformed
E-Mail: pchang@cs.stanford.edu | public duty gland and a natural deficiency
Snail Mail: PO Box 9603 | of moral fiber..."
Stanford, CA 94309 | Ford Prefect, HHGTTG
Path: ucivax!gateway
From: k044477@hobbes.kzoo.edu ("Jamie R. McCarthy")
Subject: Re: Think C Debugger vs Large ppats
Message-ID: <9209221333.AA12223@hobbes.kzoo.edu>
In-Reply-To: <9209220303.AA29245@Xenon.Stanford.EDU>; from "The Weasel" at Sep 22, 92 3:03 am
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 15
Date: 22 Sep 92 13:31:05 GMT
> I was just wondering if anybody knows if it is true that the Think C
> debugger does not get along with any manipulations of the system's
> ppat, or whatever the resource is that is the desktop's pattern I
> sort of forget.
This is what I heard: a bug in the ThC Debugger copies the 'ppat' 0
resource from the System into the Debugger's heap every time you
single-step. If you have a complex background pattern, you will
obviously run out of memory rapidly.
I'm not sure if it has to be ID 0; I think I witnessed it happening
when an ID 16 was the background pattern. Don't quote me on that. But
I use the standard 50% gray now and all is peachy.
--
Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
Path: ucivax!gateway
From: nick@dcs.ed.ac.uk (Nick Rothwell)
Subject: Re: Think C Debugger vs Large ppats
Message-ID: <9209221629.aa21685@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 11
Date: 22 Sep 92 15:30:17 GMT
>This is what I heard: a bug in the ThC Debugger copies the 'ppat' 0
>resource from the System into the Debugger's heap every time you
>single-step. If you have a complex background pattern, you will
>obviously run out of memory rapidly.
Hmm, interesting. This might explain why, after installing a nifty desktop
pattern using Desktop Textures, single-stepping in the debugger causes me
to run out of memory rapidly... :-)
Nick.
Path: ucivax!gateway
From: BEASON@uno.cc.geneseo.edu (Bob Beason)
Subject: (none)
Message-ID: <01GP3BMTEDI8000CSZ@geneseo.bitnet>
Newsgroups: fa.think-c
X-VMS-To: IN%"think-c@ics.uci.edu"
Lines: 1
Date: 22 Sep 92 20:46:38 GMT
Sub Bob Beason
Path: ucivax!gateway
From: dnebing@andy.bgsu.edu ("Mr. Neb")
Subject: (none)
Message-ID: <9209222047.AA03608@andy.bgsu.edu>
Newsgroups: fa.think-c
Lines: 9
Date: 22 Sep 92 20:47:29 GMT
Silly me, I lost all of my information on a package titled
something like Word Solution Engine(?). It was a library for Think C
that could handle text files > 32k.
Does anyone remember the correct name and where to find it?
Dave Nebinger
dnebing@andy.bgsu.edu
Path: ucivax!gateway
From: MIGUEL@acadvm1.uottawa.ca ("Nabil J. Miguel")
Subject: (none)
Message-ID: <9209221514.aa05647@q2.ics.uci.edu>
Newsgroups: fa.think-c
X-Delivery-Notice: SMTP MAIL FROM does not correspond to sender.
Lines: 1
Date: 22 Sep 92 22:14:46 GMT
Subscribe Nabil Miguel
Path: ucivax!gateway
From: CYMT%MUSICA.MCGILL.CA@vm1.mcgill.ca (CYMT000)
Subject: subscription think-c
Message-ID: <23SEP92.00743524.0062.MUSIC@MUSICA.MCGILL.CA>
Newsgroups: fa.think-c
Lines: 3
Date: 23 Sep 92 04:42:01 GMT
sub think-c
Thich Quang Due
cymt@musica.mcgill.ca
Path: ucivax!gateway
From: jgarner@seattleu.edu (Jeff Garner)
Subject: Excel SDK
Message-ID: <Pine.2.2.9209222315.A2720@sumax.seattleu.edu>
Newsgroups: fa.think-c
Lines: 28
Date: 23 Sep 92 06:21:43 GMT
I don't know where I should be asking this, but here goes...
1) Is there a list dedicated to the Excel Software Development Kit?
2) I received the Excel SDK (prerelease 2) in the mail the other day,
and I just tried the "Generic" add-in. The new menu called "Generic"
appears, and the dialog boxes appear exactly how they're spelled out
in the ThinkC projects... Generic ALSO has two new functions, it
adds in, too... called Func1(), and FuncSum(). I tried them, but
all I get in both my macros and on the worksheet is an error.
I did some reading in the SDK paper notes, and then tried the following
formula in a Worksheet cell: =CALL("Generic","Func1","DD",0)
but it just puts nothing in the cell, when it actually should put the
following text in the cell: "Func1". (cause the Func1() function's job
is simply to return that text string, no matter what is passed in.).
I have NOT modified any of the C code, nor did I need to recompile Func1.c
(instead, I just loaded the Generic Add-in sheet, supplied on the disk.
Generic DOES have Func1() as a CODE resource.
Any ideas? All I'm trying to do is to get Microsoft's Generic's Func1()
and FuncSum() functions to work.
Jeff Garner
Shoestring Software Products
jgarner@seattleu.edu -or- jgarner@visual.spk.wa.us
Path: ucivax!gateway
From: neuling%admiral.UUCP@cs.yale.edu (Nathan Neulinger)
Subject: C++ Compiler
Message-ID: <9209221658.aa21576@admiral.uucp>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 9
Date: 23 Sep 92 09:10:01 GMT
. For instance the << and >> operators for I/O do not work, and also the programming itself is different...
If anyone knows of a TRUE C++ compiler, please let me know?
BTW, what about MPW? Does it have a C++ module?
Nathan Neulinger
neulinger@admiral.UUCP
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: Excel SDK
Message-ID: <Mailstrom.B54.46676.15089.de19@umail.umd.edu>
In-Reply-To: Your message <Pine.2.2.9209222315.A2720@sumax.seattleu.edu> of
23 Sep 92 06:21:43 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 13
Date: 23 Sep 92 09:51:21 GMT
You mean to say they dont offer any tech support????
Given microsofts proclivity to ship bugs, I wouldnt touch that kit without it.
Have you checked your compile settings and version for compatibility?
It is possible that they are dependant upon non-standard builds of the think-c
librarys.
Have you upgraded to 5.0.3? they probably shipped 5.0.2 (and maybe even 5.0.1),
in which case, you probably should recompile their stuff.
dana s emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: afishman@jpmorgan.com (Aparajita Fishman)
Subject: (none)
Message-ID: <9209231546.AA22560@mp670-sybase.ny.jpmorgan.com>
Newsgroups: fa.think-c
Lines: 12
Date: 23 Sep 92 15:46:32 GMT
fake menubar
I would like to create a "fake" menubar using
popup menus. How does one get PopUpMenuSelect to
"let go" of the menu when the user moves out of
the menu title area? Does this require a custom
MDEF?
Thanks for your help,
- Aparajita Fishman
Natural Intelligence, Inc.
afishman@jpmorgan.com
Path: ucivax!gateway
From: afishman@jpmorgan.com (Aparajita Fishman)
Subject: fake menubar
Message-ID: <9209231650.AA22936@mp670-sybase.ny.jpmorgan.com>
Newsgroups: fa.think-c
Lines: 9
Date: 23 Sep 92 16:50:51 GMT
I would like to create a "fake" menubar using popup menus. How does one get
PopUpMenuSelect to "let go" of the menus when the user moves from menu title
to menu title? Does this require a custom MDEF?
Thanks for your help,
- Aparajita Fishman
Natural Intelligence, Inc.
afishman@jpmorgan.com
Path: ucivax!gateway
From: mxmora@unix.sri.com (Matthew Xavier Mora)
Subject: Re: fake menubar
Message-ID: <9209231728.AA25540@unix.sri.com>
Newsgroups: fa.think-c
Lines: 27
Date: 23 Sep 92 17:30:15 GMT
>fake menubar
>I would like to create a "fake" menubar using
>popup menus. How does one get PopUpMenuSelect to
>"let go" of the menu when the user moves out of
>the menu title area? Does this require a custom
>MDEF?
>
I know! I know! Pick Me! Pick Me!
You need to use a mbar hook procedure*. When the mouse leaves the menutitle
rect, you post a mouseup event in your mbarhook procedure. Menuselect will
then "let go" of the menu enabling you to slide over to the next menu.
* MBarHook=$A2C; See MrMacHook [pointer] I-356
If you need more help I have some pascal code that I can show how I did
this in a fkey. Yes I had an fkey window with a menubar.
Matt
_____________________________________________________________________
Matthew Xavier Mora | The keeper of the UMPG
SRI International | Matt_Mora@QM.sri.com
[sent using Eudora 1.3b46] | mxmora@unix.sri.com
_____________________________________________________________________
Path: ucivax!gateway
From: mxmora@unix.sri.com (Matthew Xavier Mora)
Subject: Re: fake menubar
Message-ID: <9209231745.AA26150@unix.sri.com>
Newsgroups: fa.think-c
Lines: 29
Date: 23 Sep 92 17:45:48 GMT
>fake menubar
>I would like to create a "fake" menubar using
>popup menus. How does one get PopUpMenuSelect to
>"let go" of the menu when the user moves out of
>the menu title area? Does this require a custom
>MDEF?
>
I know! I know! Pick Me! Pick Me!
You need to use a mbar hook procedure*. When the mouse leaves the menutitle
rect, you post a mouseup event in your mbarhook procedure. Menuselect will
then "let go" of the menu enabling you to slide over to the next menu.
* MBarHook=$A2C; See MrMacHook [pointer] I-356
If you need more help I have some pascal code that I can show how I did
this in a fkey. Yes I had an fkey window with a menubar.
Matt
_____________________________________________________________________
Matthew Xavier Mora | The keeper of the UMPG
SRI International | Matt_Mora@QM.sri.com
[sent using Eudora 1.3b46] | mxmora@unix.sri.com
_____________________________________________________________________
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (Aaron Barnett)
Subject: sound
Message-ID: <01GP4MTTFJ6A99E6SG@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 2
Date: 23 Sep 92 19:17:57 GMT
X-Envelope-to: think-c@ics.uci.edu
how do i play a sound from a resource and be able to go on with
other buisness while it plays?
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (Aaron Barnett)
Subject: copyBits,GWorlds, and PICTs
Message-ID: <01GP4MZICEAQ9376TT@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 8
Date: 23 Sep 92 19:23:58 GMT
X-Envelope-to: think-c@ics.uci.edu
I'm drawing a PICT resource to an offscreen GThing and copying it
to the _real world when needed. no problem (sometimes). most the time
everything is cool except the PICT i really need i drew in superpaint
will no work. well it works it just doesn't look like the origianal.
some other Pictures i did in sp work. im of course useing copybits.
does anybody know what things can contribute to this kind of problem?
(-: a reverse!
Path: ucivax!gateway
From: williamssp@gtewd.mtv.gsc.gte.com (Steve Williams)
Subject: Need RDBMS Library Help
Message-ID: <009610C8.805731A0.8182@GTEWD>
Newsgroups: fa.think-c
Reply-To: williamssp@gtewd.mtv.gsc.gte.com
Lines: 43
Date: 23 Sep 92 19:59:29 GMT
Does anybody out there have any experience with commercial database library
packages such as db_VISTA (Raima Data Manager), CodeBase (from Sequiter), or
C-Tree (from Faircom)?
I have an urgent need to add some more robust data handling to an existing
THINK C application, and am looking to by such a package. I have experience
with several commercial RDBMS systems for the Mac (i.e., 4th Dimension, Omnis
3), but nont of these provides an API for C-language programs to access the
data.
The target environment for my application is Mac II level machines with System
6.0.8. I just need a simple API for C to manipulate four related tables to
support inserting, searching, retrieving, and updating of data in the tables.
So far, it looks like db_VISTA is the most complete package of routines, and
all the info I have indicates that it is also the fastest, but according to
Raima's sales line, it is not available on the Macintosh except as a
"Portability Kit" which has all of the (allegedly ANSI C) source code. This is
a very expensive proposition (about $3.2K).
CodeBase IV is also only available for a Mac developer as C source code in a
porting kit, however it is much less expensive (i.e. $595). It claims to be
able to read and write dBase IV data and index files, but that is not a driving
requirement for me.
I don't yet have any pricing or platform availability info for the Faircom
stuff, but they've been advertising in MacTutor for several years, so I gather
that somebody must be using this product on the Mac.
Are any of these commercial packages worth buying? Has anybody done the
porting to the Macintosh environment? What kinds of nasty memory management
games are needed?
Please reply via e-mail directly to "williamssp@gtewd.mtv.gsc.gte.com" -- I
will summarize and re-post to the appropriate place
Thanks in advance for all help
Steve Williams
P.S. If you subscribe to both THINK-C and TCL, sorry for the duplicate
posting, but I need to make a decision by the end of this week.
Path: ucivax!gateway
From: igorl@ncsa.uiuc.edu (Igor Livshits)
Subject: Plug-ins
Message-ID: <9209232006.AA24542@newton.ncsa.uiuc.edu>
Newsgroups: fa.think-c
Lines: 8
Date: 23 Sep 92 20:07:04 GMT
Hello,
Does anyone have example code (straight or objective) to deal with plug-in
code modules? I am looking for functionality akin the MS Word or Deneba's
Canvas modules.
Many thanks, igor
Path: ucivax!gateway
From: egw@p3.lanl.gov (egw)
Subject: TCL and Backgrounding
Message-ID: <9209232131.AA13608@p.lanl.gov>
Newsgroups: fa.think-c
Lines: 36
Date: 23 Sep 92 21:32:03 GMT
Subject: TCL and Backgrounding
Sent: 2:46 PM 9/23/92
Greetings,
I'm interested in allowing a computationally intensive TCL-based application to
be put into the background and have it continue processing. I want to be able
to hog the whole CPU while the app. is in the foreground but, once swithced,
become very friendly and do very little on each null event it receives.
What I have now is a big computation loop which iterates at about 100/sec. and
doesn't call "WaitNextEvent()". I put up a movable modal dialog and update it
to indicate the progress every 100 iterations.
The first thing that ocurred to me was to put a call to
"CApplication::Process1Event()" into the computation loop which would only be
called say every 100 iterations while the app. is in the foreground (maximizing
processing speed while the app. is in the foreground) and perhaps every one or
two iterations if 'gInBackground' is TRUE.
Unfortunately, inside the "Process1Event()" call the switchboard tries to
dispatch an activate event to a null window object. It looks like
"CSwitchboard::DoActivte()" its trying to get a CWindow object out of a mac
window's refcon.
My questions are.
1) Why doesn't this work? Is it "illegal" to call "Process1Event()"?
2) Is there any way, short of making the whole computation into a bunch of
chores, to get the TCL to behave as I described in the first paragraph of this
message?
Thanks,
Eric
egw@p3.lanl.gov
Path: ucivax!gateway
From: vilot@bigboy.cis.temple.edu (Tom Vilot)
Subject: (none)
Message-ID: <Pine.2.4.55.9209240051.A5768@bigboy.cis.temple.edu>
Newsgroups: fa.think-c
Lines: 1
Date: 24 Sep 92 04:02:32 GMT
Subscribe Thomas Vilot
Path: ucivax!gateway
From: SDZ5%IAEA1.BITNET@aearn.edvz.uni-linz.ac.at
Subject: TCL mailing list
Message-ID: <9209240339.aa25816@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 7
Date: 24 Sep 92 10:39:19 GMT
Hi y'all,
I'm relatively new to the think-c mailing list, and I keep
hearing about a TCL mailing list ... can anyone tell me how
to subscribe to that list, too?
Thanks.
Chuck Schneider sdz5@iaea1 (bitnet)
Vienna, Austria
Path: ucivax!gateway
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: re: sound
Message-ID: <9209241420.AA22844@itl.itd.umich.edu>
Newsgroups: fa.think-c
Lines: 37
Date: 24 Sep 92 14:22:16 GMT
Aaron Barnett writes:
>how do i play a sound from a resource and be able to go on with
>other buisness while it plays?
There are a couple of approaches; if you'd like to continue this in
detail, I'll mail you some code snippets, but I thought I'd leave the
general discussion on the group for now, since it might be of general
interest.
This is all covered _pretty_ well in IM-6; I say _pretty_ well because
while all the information is there, it is organized in a manner that
makes it rather hard to use. Also, sound code is generally kind of
tough, because the Sound Manager is unforgiving. The code to use it
isn't that complex, but a slight error can cause truly amazing crashes.
Assuming you want to play a sampled sound from a resource: approach 1
is to allocate a sound channel, load the resource, walk through the
resource until you get a pointer to the sampled sound header, set up
a callback routine which will be executed when the sound is done playing,
and then queue up the sound command. Sound commands can also be somewhat
tricky to use because they don't always behave the way one would expect.
Approach 2 is to use some of the new sound routines which will double-
buffer a sound from disk. This way you don't need to have enough free
memory to load the whole sound resource in and lock it down. On the
down side, these routines are tricky to use.
Jim Reekes, the sound manager guy at Apple, has sample code (in Pascal
still, I believe) which demonstrates doing asynchronous sound play; that's
one of the sample code packages ftp-able from Apple.
Try looking at the sample code first if you an get access to it. E-mail
me off the group if you want to see some of my code.
Paul Potts
potts@itl.itd.umich.edu
Path: ucivax!gateway
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: re: sound
Message-ID: <9209241435.AA22918@itl.itd.umich.edu>
Newsgroups: fa.think-c
Lines: 38
Date: 24 Sep 92 14:37:17 GMT
Aaron Barnett writes:
>how do i play a sound from a resource and be able to go on with
>other buisness while it plays?
There are a couple of approaches; if you'd like to continue this in
detail, I'll mail you some code snippets, but I thought I'd leave the
general discussion on the group for now, since it might be of general
interest.
This is all covered _pretty_ well in IM-6; I say _pretty_ well because
while all the information is there, it is organized in a manner that
makes it rather hard to use. Also, sound code is generally kind of
tough, because the Sound Manager is unforgiving. The code to use it
isn't that complex, but a slight error can cause truly amazing crashes.
Assuming you want to play a sampled sound from a resource: approach 1
is to allocate a sound channel, load the resource, walk through the
resource until you get a pointer to the sampled sound header, set up
a callback routine which will be executed when the sound is done playing,
and then queue up the sound command. Sound commands can also be somewhat
tricky to use because they don't always behave the way one would expect.
Approach 2 is to use some of the new sound routines which will double-
buffer a sound from disk. This way you don't need to have enough free
memory to load the whole sound resource in and lock it down. On the
down side, these routines are tricky to use.
Jim Reekes, the sound manager guy at Apple, has sample code (in Pascal
still, I believe) which demonstrates doing asynchronous sound play; that's
one of the sample code packages ftp-able from Apple.
Try looking at the sample code first if you an get access to it. E-mail
me off the group if you want to see some of my code.
Paul Potts
potts@itl.itd.umich.edu
Path: ucivax!gateway
From: sjbury@bubbles.rice.edu ("Scott J. Bury")
Subject: unsubscribe
Message-ID: <9209241700.AA06137@bubbles.rice.edu.rice.edu>
Newsgroups: fa.think-c
Lines: 4
Date: 24 Sep 92 17:04:20 GMT
unsubscribe
sjbury@owlnet.rice.edu
sjbury@rice.edu
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (Aaron Barnett)
Subject: ldef
Message-ID: <01GP5VB4DSGI937BRM@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 35
Date: 24 Sep 92 17:10:27 GMT
X-Envelope-to: think-c@ics.uci.edu
is it uncool to write ldefs or something. Archie reveals cdef,mdef, &
wdef locations but no ldefs.
well this is what's up. i'm writing an ldef and want to (for development)
to have the code there with the rest of the program. then when its done
move it to an ldef resource. i used a method from pupcdef(i think) to
write several cdefs. can i do the same for an ldef. heres the cdef stuff
#define JMP_INST 0x4EF9
#define COMP_ID 294
typedef struct{
short jmpInst;
ProcPtr addrCDEF;
}fakeCDEF,*fakeCDEF_p,**fakeCDEF_h;
static fakeCDEF_h installCDEF(int idCDEF){
fakeCDEF_h fakeH = (fakeCDEF_h)Get1Resource('CDEF',idCDEF);
(*fakeH)->jmpInst = JMP_INST;
(*fakeH)->addrCDEF = (ProcPtr)&WindCDEF;
return fakeH;
}
fakeCDEF_h fakeH;
fakeH = installCDEF(COMP_ID);
myControl = NewControl ( myWindow, &compassRect,
"\p.", true, 0, 1, 359, 16 * COMP_ID, 0 );
at cdef resource COMP_ID is a fake cdef
i imagine JMP_INST is the important one to change.
anyone?
Path: ucivax!gateway
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: TCL mailing list
Message-ID: <9209241931.AA14295@netcom.com>
Newsgroups: fa.think-c
Lines: 1
Date: 24 Sep 92 19:34:22 GMT
I second that; I wanna knowhow to subscribe too.
Path: ucivax!gateway
From: NLEONARD@rcnvms.rcn.mass.edu
Subject: think c request
Message-ID: <01GP629LPOC2AC4A7O@RCNVMS.RCN.MASS.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: IN%"think-c@ics.uci.edu"
Lines: 1
Date: 24 Sep 92 19:51:03 GMT
think-c-request
Path: ucivax!gateway
From: egw@p3.lanl.gov (egw)
Subject: Re: TCL and Backgrounding
Message-ID: <9209251451.AA14767@p.lanl.gov>
Newsgroups: fa.think-c
Lines: 20
Date: 25 Sep 92 14:51:54 GMT
Subject: Re: TCL and Backgrounding
Sent: 8:38 AM 9/25/92
The problems I was having when calling "Process1Event()" inside a computation
loop to allow a TCL app. to go into the background while still calculating have
been solved.
The culprit was a manually created (i.e. non-TCL) movable-modal dialog that I
had put up when the computation started. When the switchboard receives update,
deactivate, and activate events from the Toolbox it assumes that all its mac
windows were created by the TCL and expects a reference to a CWindow subclass
to stored in the window's refcon.
Moral: Be very cautious about using non-TCL created windows in a TCL app.
Thanks to Dana Emery for helping me to see the light.
Eric
Path: ucivax!gateway
From: williamssp@gtewd.mtv.gsc.gte.com (Steve Williams)
Subject: RE: TCL and backgrounding
Message-ID: <0096125B.9B4F7C80.8679@GTEWD>
Newsgroups: fa.think-c
Reply-To: williamssp@gtewd.mtv.gsc.gte.com
Lines: 34
Date: 25 Sep 92 20:04:52 GMT
> Subject: Re: TCL and Backgrounding
> Sent: 8:38 AM 9/25/92
> The problems I was having when calling "Process1Event()" inside a computation
> loop to allow a TCL app. to go into the background while still calculating have
> been solved.
>
> The culprit was a manually created (i.e. non-TCL) movable-modal dialog that I
> had put up when the computation started. When the switchboard receives update,
> deactivate, and activate events from the Toolbox it assumes that all its mac
> windows were created by the TCL and expects a reference to a CWindow subclass
> to stored in the window's refcon.
>
> Moral: Be very cautious about using non-TCL created windows in a TCL app.
>
> Thanks to Dana Emery for helping me to see the light.
>
> Eric
The last paragraph of page 475 in the THINK C v5 OOP manual describes what your
application must do if it wants to support a window that is not handled by the
TCL. Included is a warning that you *MUST* override CDesktop::DispatchClick(),
CDesktop::DispatchCursor(), CSwitchboard::DoUpdate(),
CSwitchboard::DoActivate(), and CSwitchboard::DoDeactivate().
Does anybody know if you also need to override the CSwitchboard::DoKeyEvent()
method as well? Probably you can think of externally supplied windows that
would like to see both MouseDown() and MouseUp() and not just a "click"--do
these methods also need to be over-ridden?
Just curious--has anybody ever put an external window into their TCL
application?
Steve Williams
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Opening my INIT file after startup...
Message-ID: <920925162535.202036f4@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 25 Sep 92 20:29:30 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
I'm writing an INIT, that every hour will read a resource from it's file, but
for the life of me I don't know how to find out how to re-open it! I'm looking
for a System 6.x compatable command that will tell me the name and vRef, or
I guess a FSSpec will do, of my INIT file at startup time. I know there is a
way do to it, and I think that at one time I had some code to do it, but I
can't seem to find it here. (I have the develope CD Rom (vX) here, so if it's
on it just tell me a name...)
Thanks...
Path: ucivax!gateway
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: Opening my INIT file after startup...
Message-ID: <199209261949.AA05093@tarski.cogsci.uiuc.edu>
X-Mailer: Eudora [version 1.3a81 MacTCP]
Newsgroups: fa.think-c
Lines: 38
Date: 26 Sep 92 19:49:37 GMT
X-Attachments: :Hard Disk:363:RefNumToFSSpec.c:
SCHENKL@vax.cs.hscsyr.edu wrote:
>I'm writing an INIT, that every hour will read a resource from it's file, but
>for the life of me I don't know how to find out how to re-open it! I'm looking
>for a System 6.x compatable command that will tell me the name and vRef, or
>I guess a FSSpec will do, of my INIT file at startup time. I know there is a
>way do to it, and I think that at one time I had some code to do it, but I
>can't seem to find it here. (I have the develope CD Rom (vX) here, so if it's
>on it just tell me a name...)
Just call the following routine with the refNum set to CurResFile(). You
could rewrite it to use other than FSSpecs.
pr
--
Pete Resnick (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet: resnick@cogsci.uiuc.edu
OSErr RefNumToFSSpec(short refNum, FSSpecPtr fileSpec)
{
OSErr errCode;
FCBPBRec theFCB;
long myAttributes;
theFCB.ioCompletion = nil;
theFCB.ioNamePtr = fileSpec->name;
theFCB.ioVRefNum = 0;
theFCB.ioRefNum = refNum;
theFCB.ioFCBIndx = 0L;
errCode = PBGetFCBInfoSync(&theFCB);
fileSpec->vRefNum = theFCB.ioFCBVRefNum;
fileSpec->parID = theFCB.ioFCBParID;
if(TrapAvailable(_GestaltDispatch) && (Gestalt(gestaltFSAttr, &myAttributes) == noErr) && (myAttributes & (1 << gestaltHasFSSpecCalls)))
FSMakeFSSpec(fileSpec->vRefNum, fileSpec->parID, fileSpec->name, fileSpec);
return(errCode);
}
Path: ucivax!gateway
From: Rich_Watts@dgc.ceo.dg.com
Subject: E-mail
Message-ID: <9209271618.AA00038@rtp41.rtp.dg.com>
Newsgroups: fa.think-c
Lines: 11
Date: 27 Sep 92 15:29:15 GMT
Is there a "local" mail application that uses appletalk lines to send
messages (etc...), and can also send mail through the internet? This
may seem an unusual place to ask - but I just thought I would throw
it out. Please send comments direct and I will post the results if
any are interested.
Thanks in advance,
Rich Watts
Path: ucivax!gateway
From: sale@els.xyplex.com (Ed Sale)
Subject: How can an app set file/folder icon locations in Finder windows?
Message-ID: <9209271536.AA11841@xyplex.com>
Newsgroups: fa.think-c
Reply-To: elsale@eng.xyplex.com
Lines: 37
Date: 27 Sep 92 15:33:41 GMT
Fellow Think-C programmers,
This is my first posting to this group. Hopefully it is the correct
forum for a generic Mac programming question.
I'm writing a small program and would like it to be able to tell the
Finder where to position newly created files and folders inside of its
folder display windows. It's putting the file icons where I want it
to, but I'm having trouble with folder icons.
I have tried using PBGetCatInfo() on a folder, modifying the
dirInfo.ioDrUsrWds.frLocation field, then doing a PBSetCatInfo().
This usually works on folders that have not been recently created -
although sometimes the finder window has to be closed and re-opened
for the icons to appear in their new locations.
When I try the following:
FSpDirCreate();
PBGetCatInfo();
/* change dirInfo.ioDrUsrWds.frLocation */
PBSetCatInfo();
PBGetCatInfo();
the dirInfo.ioDrUsrWds.frLocation field shows the requested icon
position, but the Finder winds up putting the folder wherever it wants
to.
Is there an approved way to get the Finder to do what I want?
Where can I find a list of Apple Events supported by the Finder?
Any help that you could share with me would be greatly appreciated.
-- Ed Sale elsale@eg.xyplex.com
BTW: I'm using Think-C 5.0.3 on a IIsi using System Software 7.0
without the tune-up.
Path: ucivax!gateway
From: GRAPHICS@wsuvm1.csc.wsu.edu (Brandon Burch)
Subject: subscribe and help
Message-ID: <9209271113.aa02270@q2.ics.uci.edu>
Newsgroups: fa.think-c
Organization: WSU CAHE USER
Lines: 28
Date: 27 Sep 92 18:14:01 GMT
Hello,
Would you please add my name to your list of subscribers. Also, could you tell
me how to access past messages from other subscribrers. Thanks.
Now for the help. I have been trying to make a polygon on the screen. I have
Macintosh Revealed and it has a code segment in pascal to create a polygon
on the screen. I tried to translate the code to C but have been unsuccessful.
This is what I tried:
PolyHandle thePoly;
thePoly=OpenPoly();
MoveTo(150,50);
Line(100,0);
Line(0,100);
etc, etc,
ClosePoly();
FramePoly(&thePoly);
KillPoly(&thePoly);
This doesn't produce any polygon on the screen. But if I remove the OpenPoly,
ClosePoly, FramePoly, and KillPoly, the lines will draw on the screen. Can
anyone help me?
Another area of help I need is on pointers and the handlers for the pointer.
Thank you in advance,
Brandon Burch
graphics@wsuvm1
graphics@wsuvm1.csc.wsu.edu
Path: ucivax!gateway
From: P30WCC9%NIU.bitnet@uicvm.uic.edu (WES COVALT)
Subject: GetGWorldPixMap()
Message-ID: <9209280820.aa05767@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 7
Date: 28 Sep 92 15:20:20 GMT
When I use GetGWorldPixMap() I get a result of 0 even though
I can get the pixMap manually and verify its existance through
the debugger.
Any clues?
Thanks
Path: ucivax!gateway
From: P30WCC9%NIU.bitnet@uicvm.uic.edu (WES COVALT)
Subject: Unpacking MacPaint files
Message-ID: <9209280832.aa08018@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 17
Date: 28 Sep 92 15:32:53 GMT
I am having problems with a routine that unpacks a MacPaint file.
The code came from _Macintosh Programing Secrets_ 2nd edition on
page 288:
for (scanline=0; scanline < 720; ++scanline){
UnpackBits( &sourcePtr, &destPtr, 72 );
destPtr += (rowBytes - 72 );
}
The curious thing is than UnpackBits is not incrementing sourcePtr
completely - (for example 0x2BC304 to 0x2BC306).
When I run this under the Debugger, the screen freezes up and
occationaly the menuBar has garbage in it. The sourcePtr is a
valid file, and destPtr is a baseAddr to a valid GWorld PixMap.
What gives?
Path: ucivax!gateway
From: KFISCHER@arac.llnl.gov (Kathleen Fischer)
Subject: Motif
Message-ID: <01GPB8M48G5C0004F0@addvax.llnl.gov>
Newsgroups: fa.think-c
X-VMS-To: addvax::IN%"think-c@ics.uci.EDU"
Lines: 9
Date: 28 Sep 92 15:43:28 GMT
X-Envelope-to: think-c@ics.uci.EDU
I have noticed many new applications comming out for the Mac have a very
Motif like appearence to them (SimLife is one I just got .. neat game/toy
and, in fact, system 7 itself is leaning that way). I was wondering if
there was anyone out there with TCL classes will create push buttons and
sliders and such that have that 3D appearence to them (for color/grey scale
monitors)?
Kathleen
kfischer@arac.llnl.gov
Path: ucivax!gateway
From: MRUHL@azcc.arizona.edu (The sky is ecstasy dancing)
Subject: long ints and such.
Message-ID: <920928110351.28c07e6d@AZCC.Arizona.EDU>
Newsgroups: fa.think-c
Lines: 24
Date: 28 Sep 92 18:04:04 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
Hi,
I just ran into something annoying last night. A friend of mine is using
his Mac to create a program for a unix machine, which normally thinks that ints
are 4 bytes. So I told him to turn on the 4-byte ints switch in the
preferences. I figured that once you did this, you could do this:
printf("the int is %d\n", i);
And have it work correctly. Well it doesn't. The only way to get it to work
is the following:
printf("the int is %ld\n", i);
If you have run across this before, please ignore this post. If not, it is
just FYI. Took me about an hour to figure out what was wrong with my machine
last night. :)
Mike
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Mike Ruhl
Operator
Arizona Cancer Center
mruhl@azcc.arizona.edu
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: Re: long ints and such.
Message-ID: <9209281437.aa15022@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 57
Date: 28 Sep 92 21:37:15 GMT
Mike Ruhl (mruhl@azcc.arizona.edu) writes
>Hi,
> I just ran into something annoying last night. A friend of mine is using
>his Mac to create a program for a unix machine, which normally thinks that ints
>are 4 bytes. So I told him to turn on the 4-byte ints switch in the
>preferences. I figured that once you did this, you could do this:
>
> printf("the int is %d\n", i);
>
>And have it work correctly. Well it doesn't. The only way to get it to work
>is the following:
>
> printf("the int is %ld\n", i);
>
>If you have run across this before, please ignore this post. If not, it is
>just FYI. Took me about an hour to figure out what was wrong with my machine
>last night. :)
hello Mike, quick response off top of head, but with reasonably high
probability of success is: he needs to recompile the ANSI source code with
32bit ints. This is mentioned in a note on p172 of the THINK C 5 User
Manual; also see p12 of the Library Reference Manual. You need to do this
for each combination of compiler options, eg native floating-point 4byte
ints ... you plan on using. In my case I've got three versions of the ANSI
library - normal, one with 32bit ints, and one with 32bit ints/64bit
doubles.
Unfortunately, THINK C linking doesn't appear to verify libraries have been
compiled with the same options. Having prototypes in scope is *not* a
complete solution either, eg if your project is using 80bit floats and a
library has been compiled with 64bit - because you simply can't
cast/promote between these data types in THINK C [I should check manual on
this example though].
Also I ran across a related problem in developing a code resource for
Prograph. A library of glue routines (XP_support_I) is supplied which you
include in you project. I thought that #including the prototypes for these
library functions would be sufficient, but things simply weren't working if
I enabled the 4byte int option. As I wrote at the time:
Until XP_support_I is supplied in source code form, or all argument types
in its routines are changed to longs, you cannot use the "4byte Integers"
option. Under THINK C 5 it appears that even though the prototype in scope
says all parameters are shorts, the compiler places unshortened ints onto
the parameter stack - it is left for the *called* routine to extract the
shortened form. There may well be a good reason why the compiler works this
way, but the symptom I was getting was that the XPRIMs didn't appear in
Prograph.
cheers,
X500: @c=AU [I'm about to update VTHRC entries, soon...]
@o=University of Queensland
@ou=Physiology and Pharmacology Department
@ou=Vision Touch and Hearing
@cn=Danny Thomas
@rfc822Mailbox=vthrc@cc.uq.oz.au
Path: ucivax!gateway
From: CHERRY%howard@msscc.med.utah.edu
Subject: Re: long ints and such.
Message-ID: <EB291A8B153F001D3A@msscc.med.utah.edu>
Newsgroups: fa.think-c
X-VMS-To: MSSCC::IN%"think-c@ics.uci.edu"
Lines: 29
Date: 28 Sep 92 22:54:20 GMT
X-Envelope-to: think-c@ics.uci.edu
MRUHL@azcc.arizona.edu writes:
>Hi,
> I just ran into something annoying last night. A friend of mine is using
>his Mac to create a program for a unix machine, which normally thinks that ints
>are 4 bytes. So I told him to turn on the 4-byte ints switch in the
>preferences. I figured that once you did this, you could do this:
>
> printf("the int is %d\n", i);
>
>And have it work correctly. Well it doesn't. The only way to get it to work
>is the following:
>
> printf("the int is %ld\n", i);
>
The ANSI library can not in any way "know" that you have turned on 4-byte
ints; the machine code doesn't know from types, it just does the two
byte thing when it sees a %d. What you may want to do is create a
4-byte int version of the ANSI library. Make a copy of ANSI, open it
up as a project in Think C, check 4 byte ints, and choose "bring
up to date." Then, use this modified library in your projects which use
4 byte ints (I assume this will work; I've never tried it, but I've done
similar things with floating point options, etc.). Hope this helps.
-Josh Cherry
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (Aaron Barnett)
Subject: aRect.topLeft
Message-ID: <01GPC0GAOL9U936C64@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 4
Date: 29 Sep 92 02:02:23 GMT
X-Envelope-to: think-c@ics.uci.edu
IM-I says i can get the top-left "Point" of a Rect structure with
aRect.topLeft
ThinkRef doesn't say so and my compiler is grousing up a storm.
have i been lied to bye IM?
Path: ucivax!gateway
From: siegel@world.std.com (Rich Siegel)
Subject: Re: aRect.topLeft
Message-ID: <199209290337.AA10618@world.std.com>
Newsgroups: fa.think-c
Lines: 8
Date: 29 Sep 92 03:37:53 GMT
Inside Mac is written in terms of Pascal, which allows you to use fields
of a variant record (a union, in C) without qualifying which member of the
union you're using.
THINK C provides macros, topLeft(r) and botRight(r), which, given a Rect,
will return the corresponding corner point of the rectangle.
R.
Path: ucivax!gateway
From: lebeuze@cicb.fr
Subject: Think-c mailing list
Message-ID: <199209290908.AA14179@mailimailo.univ-rennes1.fr>
Newsgroups: fa.think-c
Lines: 5
Date: 29 Sep 92 09:40:36 GMT
Please, can you add me to the Thinck-c mailing list
Thanks
Albert Le Beuze
Universite de Rennes I
Path: ucivax!gateway
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: aRect.topLeft
Message-ID: <9209291051.AA07537@netcom.com>
Newsgroups: fa.think-c
Lines: 7
Date: 29 Sep 92 10:53:41 GMT
The thing to remember is that the Mac system was originally written in Pascal,
so it likes Pascal calling conventions. Any other language is more like ass-
embly language, meaning that in general the programmer must do some manipu-
lations to get certain effects. C is very close to assembly and Think C is
provided with a (hopefully complete) library of toolbox calls, global variables
and structure definitions. The field you ask for is possible to define in C
but was apparantly left out.
Path: ucivax!gateway
From: mdl@junior.bintec.de (Mike Lyons)
Subject: Where can I get TC 5.0.3 online?
Message-ID: <9209291528.AA09400@junior.bintec.de>
Newsgroups: fa.think-c
Lines: 5
Date: 29 Sep 92 16:05:38 GMT
Hi all,
Does anyone know where I can find an updater from Think C 5.0.2 to 5.0.3?
Mike
Path: ucivax!gateway
From: KFISCHER@arac.llnl.gov (Kathleen Fischer)
Subject: Color
Message-ID: <01GPCXDCBD8G0005T0@addvax.llnl.gov>
Newsgroups: fa.think-c
X-VMS-To: ADDVAX::IN%"think-c@ics.uci.EDU"
Lines: 16
Date: 29 Sep 92 20:43:27 GMT
X-Envelope-to: think-c@ics.uci.EDU
ARRRRGGGG
Ok, call me stupid ... but I don't see how to use TCL and color. Am I missing
the boat here? Is my manual missing that page? I want to be able to modify
my buttons to be in gray scale, (3D looking). How do I do that?
All comments about RTFM will be cheerfully accepted so long as they include
page numbers! :^)
Of course, some 'C' source would be really nifty if it turns out that I'm
not a raving lunatic, and that Think C 5.0.2 DIDN'T come equipt to turn my
buttons grey.
Thanks,
Kathleen
kfischer@arac.llnl.gov
Path: ucivax!gateway
From: david@cs.ucla.edu (David Dantowitz)
Subject: Re: long ints and such.
Message-ID: <9209300204.AA25900@oahu.cs.ucla.edu>
Newsgroups: fa.think-c
Lines: 4
Date: 30 Sep 92 02:04:51 GMT
Mike
First you have to recompile the ANSI library with 4-byte ints on.
David
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: Color
Message-ID: <Mailstrom.B54.54183.-3114.de19@umail.umd.edu>
In-Reply-To: Your message <01GPCXDCBD8G0005T0@addvax.llnl.gov> of 29 Sep 92
20:43:27 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 44
Date: 30 Sep 92 07:46:53 GMT
Kathleen
BTW, 5.0.3 updater is available via annonymous ftp from Sumex-aim.stanford.edu.
first, some generalitys.
macintosh programs have to be able to function on b/w and greyscale monitors,
color should not be a prerequisite for the general application.
Also, while the TCL is an application framework, it is not a total substitute
for the OS, which keeps it lean and mean. You see this in the Bartender class,
where the bartender only supplys access methods which involve the data it
maintains in parrallel with the OS menumanager. Wait for Bedrock, if you want
that much glue inserted between your ap and the native hardware.
now to the specific.
The documentation for color under system 6 is in IM-5, and is modified by IM-6
to reflect system 7 changes, and amplified by certain TN. For controls, you
should read about the control manager, and also color quickdraw. The standard
contol procs will colorize themselves via custom color table resources, or you
can author your own control procs (lotsa luck on this one).
Colorized standard controls should come for free in TCL, the OS should handle
all of that for you. You'll use ResEdit (Resourcerer, SARez, whatever) to make
the appropriate routines, and have your program use color windows wherever
possible (I think CWindow does that automatically, but you should check IWindow
just to make sure).
Now if you want to provide a programmaticly controled appearance, that is
entirely up to you, as neither the TCL, nor the OS have any direct support.
Be warned, that direct manipulation of color behind the users back is often
considered a fiendly action by users, especially color-blind ones. Also, the OS
has to moderate a shared resource between all active processes, namely the color
tables of the monitor, and thus the actual colors available to your app may not
be stable, especially if your user is running superpaint or photoshop against
your app.
Hope this helps,
--
dana s emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: ferrante@aaec1.aaec.com
Subject: (none)
Message-ID: <9209301246.AA07508@aaec.com>
Newsgroups: fa.think-c
Lines: 20
Date: 30 Sep 92 13:01:24 GMT
Jim Lynch <jimlynch@netcom.com> writes:
>The thing to remember is that the Mac system was originally written in Pascal,
>so it likes Pascal calling conventions. Any other language is more like ass-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>embly language,
^^^^^^^^^^^^^^^
I beg to differ, I've been programming Lisp & CLOS for years now and
they're much less like assembler. C of course, is much more like assembler
than most other languages which is why it has a certain utility.
---
Richard D. Ferrante
Atlantic Aerospace Electronics Corporation
470 Totten Pond Road
Waltham, Ma. 02154
(617) 890-4200
ferrante@aaec.com
Path: ucivax!gateway
From: apple@elm (Tom Luhrs)
Subject: stdio and keyDown events
Message-ID: <9209301249.AA08639@elm.sanders.lockheed.com>
Newsgroups: fa.think-c
Lines: 55
Date: 30 Sep 92 18:40:47 GMT
does anybody know of a nice (or even not so nice) way of having both
stdio going to the console and using command key equivalents for menu
items at the same time? i've looked through the archives directory
on ftp.ics.uci.edu and i found a question that appears to be asking
about the same problem, but i didn't see any response more than this:
> Path: ucivax!gateway
> From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
> Subject: GetNextEvent beeps at me instead of returning keyDown
> Message-ID: <9104220235.AA04718@chaos.cs.brandeis.edu>
> In-Reply-To: Bill Dugan's message of 21 Apr 91 09:24:56 GMT
> <28115A68.6279@orion.oac.uci.edu>
> Newsgroups: fa.think-c
> Lines: 27
> Date: 22 Apr 91 03:33:03 GMT
>
>> Is there some kind of call I might inadvertently have made that
>> will mask out the keyDown event? Or perhaps GNE thinks that the
>> stdio window is a DA window and attempts to take care of the event
>> itself instead of returning it to me?
>
> Actually, the stdio window (called the "console" window in v4.0) is
> implemented as a self-installing driver, which behaves like a DA. If
> this window is frontmost, and if you've done the standard mac
> initializations, then you will get beeps for keydowns. This is
> because the console library only receives input if you haven't done
> the standard mac inits. The downside to this is that the console
> window grabs the key events if it's frontmost even if it doesn't use
> them.
>
> The simplest way to fix this problem would be to make sure that the
> console window isn't frontmost when your program receives input.
>
> The less simple fix is to modify the driver event mask for the console
> window, by looking up the console driver in the Unit Table. If you're
> interested in the trickier solution, I can post the code. (It's at
> work, or I'd post it now.)
>
> -phil
> ----
> Phil Shapiro Technical Support Analyst
> Language Products Group Symantec Corporation
> Internet: phils@chaos.cs.brandeis.edu
is there a way of filtering out only command keys? even if i lose stdin
that would be ok. (i'm only using the console for printf stuff because
it seems so painful to try and output c stuff using pascal toolbox
routines.)
any ideas? thanks in advance.
tom luhrs (apple@elm.sanders.lockheed.com)
Path: ucivax!gateway
From: mead@vault.wustl.edu (Charles Mead)
Subject: increase your karmic bank account
Message-ID: <9209302120.AA10943@vault.WUstl.EDU>
Newsgroups: fa.think-c
Lines: 35
Date: 30 Sep 92 21:25:49 GMT
I'm sending this out on the ThinkC net because I figure that some of you
are crazy enough to be as touched by this as I was. If not, just disregard
it as programming overload.
Yesterday, after very little sleep and a day of trying to get PenPoint
to do serial I/O on a PC (my first mistake), I went to a local fast food
place to grab a quick bite. I met a retarded adult who was attracted to
my car by its KCRW bumper sticker (Santa Monica NPR radio station). It turns
out this guy lives by himself and is an avid radio bumper sticker freak.
He is kind, gentle, and very enthusiastic and I guess I was touched by
the utter simplicity of his existence, the sole goal of which is to collect
radio bumper stickers. Unfortunately, he has never left St. Louis and has no
living family so he is limited to bumper stickers from St. Louis radio
stations. I can't possibly convey in words his fascination and obsession
with my KCRW sticker, which, unfortunately, is permanently bonded to my bumper.
So..... I am asking any of you out there who have have an extra minute and
want to do something incredibly nice for a guy who has incredibly little
going for him in most arenas. If you would drop a bumper sticker from your
favorite local radio station in the mail to me, I will pass it on to him.
He gave me his name and address and wrote, in the printing of a child,
'loves radio and tv stickers.'
If you are so inclined, send a bumper sticker (or stickers) to me at the
address below. I promise that you karmic bank account balance will increase
substantially for this small act.
Thanks
Charlie Mead
% Institute for Biomedical Computing (IBC)
700 South Euclid Ave.
St. Louis, MO 63110